package com.buluo.common

/**
 * Created by sunhao on 2017/1/11.
 */
class PageUtil {
    static init(int page, int size,int n){
        if (size < 0 || size >= n) {
            size = n;
        }
        if (page <= 0) {
            page = 1;
        }
        def start = (page - 1) * size
        def offset = size
        return [start: start, offset: offset]
    }
}
